ImageApplyIndexed
ImageApplyIndexed[f,image] applies the function f to the list of channel values for each pixel in image, giving the row and column index of each pixel as a second argument to f.
ImageApplyIndexed[f,{image1,image2,…}] applies f to the sequence of corresponding pixel values taken from each imagei, giving the corresponding row and column index of pixels as the last argument to f.
Please visit the official Wolfram Language Reference for more details and examples on core symbols.